package com.dc.designPattern._21_strategy.extend.extend3;

/**
 * Description: 引入策略模式_上下文
 * @author: gdc
 * @date: 2021/6/29
 * @version 1.0
 */
public class Context {

    private Calculator calculator;

    public Context(Calculator calculator) {
        this.calculator = calculator;
    }

    /**
     *
     * @param a
     * @param b
     * @return
     */
    public int exec(int a, int b) {
        return calculator.exec(a, b);
    }
}
